<template>
  <div>
    <h1>组件二</h1>
    子input框：
    <input @input="childInput" />
    <slot />
  </div>
</template>
<script>console.log(this)
export default {
  props: ['title', 'index', 'action', 'userName'],
  data () {
    return {
    }
  },
  methods: {
    childInput: function (e) {
      this.$emit('toParent', e.target.value)
    }
  }
}
</script>
<style scoped>
  input{
    border: 1px solid #ccc;
  }
</style>
